const Factory = {
    init: function init(list, addParams) {
        list = typeof list === 'object' ? list : [];
        return {
            list,
            handle: function command(event, params) {
                if (addParams) {
                    params = params.merge(addParams);
                }
                list.map((eventHandle) => {
                    eventHandle.handle(event, params);
                });
            },
        };
    },
};
export default Factory;
